package com.hex.ds.hdrs.log.controller;


import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.common.page.PageData;
import com.hex.ds.hdrs.log.po.ServerInteractLog;
import com.hex.ds.hdrs.log.service.ServerInteractLogService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 服务器交互日志表 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2020-11-26
 */
@Slf4j
@RestController
@RequestMapping("/api/serverInteractLog")
public class ServerInteractLogController {

    @Autowired
    public ServerInteractLogService serverInteractLogService;

    @GetMapping("/selectPages")
    @ApiOperation("查询服务日志数据")
    public ResponseEntity<Object> selectPages(ServerInteractLog serverInteractLog, Page page) {
        log.info("进入了【ServerInteractLogController】的selectPages方法");
        PageData pageData = new PageData(this.serverInteractLogService.queryServerLog(serverInteractLog, page), page);
        return new ResponseEntity<>(pageData, HttpStatus.OK);
    }
}

